import java.lang.ref.SoftReference;

public class O56II {
    public static void main(String[] a) {
        O56II o = new O56II();
        System.out.println(o.singleNumber(new int[]{3,3,4,3}));
    }
    public int singleNumber(int[] nums) {
        SoftReference<Integer> s = new SoftReference<>(1);

        int[] bits = new int[32];
        for (int num : nums) {
            for (int j = 0; j < 32; j++) {
                bits[j] += (num >> j)&1;
            }
        }
        for (int i = 0; i < bits.length; i++) {
            bits[i]%=3;
        }
        int re = 0;
        for (int i = 0; i < bits.length; i++) {
            if (bits[i]==1)
                re += Math.pow(2,i);
        }
        return re;
    }
}
